package game.targets.entity.world.arrow;

public class ArrowHit extends ArrowState {

	private float deleteTimer;

	public ArrowHit(Arrow pl) {
		super(pl);
	}

	@Override
	public void update(float delta) {
		deleteTimer += delta;
		if (deleteTimer > Arrow.DELETE_TIME) {
			arrow.setExists(false);
			//arrow.setAlpha(1 - Arrow.DELETE_TIME - deleteTimer);
			exit();
		}
	}

	@Override
	public void enter() {
		deleteTimer=0;
	}

	@Override
	public void exit() {
		arrow.changeState(new ArrowNormal(arrow));
	}

}
